﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="JobList.aspx.cs" Inherits="BoCaiWeb.WebSite.WebAdmin.JobList" %>
<%@ Import Namespace="System.Linq" %>
<%@ Import Namespace="System.Data" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>猎头岗位管理</title>
    <link href="/css/admin/admin.css" type="text/css" rel="stylesheet" />
    <script type="text/javascript" src="/js/jquery.js"></script>
</head>
<body>
    <div class="titlebt">猎头岗位管理</div>
    <div>
        <!-- 前端搜索s -->
        <div class="name">
            <form action="" method="get">
            <table border="0" cellpadding="0" cellspacing="0" height="42">
                <tbody>
                    <tr>
                        <td width="10">
                            &nbsp;
                        </td>
                        <td width="100">
                            <a href="JobEdit.aspx" class="butt_tle" style="width:80px">新建猎头岗位</a>
                        </td>
                        <td>
                            猎头岗位分类:
                        </td>
                        <td>
                            <select id="cateid" name="cateid" >
                                <option value="">请选择分类</option>
                                <% 
                                    foreach (var item in teamClassList)
                                    { 
                                %>
                                <option value='<%=item.Id %>' <%if(cateid==item.Id) {%> selected="selected"<%} %>><%=item.Name%></option>
                                <%
                                    }
                                %>
                            </select>
                        </td>
                        <td>
                            猎头岗位名称:
                        </td>
                        <td>
                            <input type="text" name="mname" value="<%=mname %>" />
                        </td>
                        <td width="10">
                            &nbsp;
                        </td>
                        <td>
                            <input id="but_submit" type="submit" value="查询" class="butt_tle" style="width:50px">
                        </td>
                    </tr>
                </tbody>
            </table>
            </form>
        </div>
        <!-- 前端搜索 e-->
        <!--显示列表s-->
        <div id="all">
            <div class="k_all3">
                <table width="100%" cellpadding="0" cellspacing="0" id="bk">
                    <tbody>
                        <tr>
                            <th width="10%">
                                职位分类
                            </th>
                            <th width="16%">
                                职位名称
                            </th>
                            <th width="18%">
                                所属部门
                            </th>
                            <th width="16%">
                                招聘人数
                            </th>
                            <th width="18%">
                                发布时间
                            </th>
                            <th width="16%">
                                操作
                            </th>
                        </tr>
                        <% 
                            foreach (var item in jobList)
                            {
                                string curCName = "";
                                var citem = BoCaiWeb.WebSite.Code.Utility.GetNewsClass().FirstOrDefault(c => c.Id == item.Cid);
                                if (citem != null)
                                {
                                    curCName = citem.Name ;
                                }
                        %>
                        <tr>
                            <td>
                                <%=curCName%>
                            </td>
                            <td>
                                <%=item.Name%>
                            </td>
                            <td>
                                <%=item.Department%>
                            </td>
                            <td>
                                <%=item.NeedNum%>
                            </td>
                            <td>
                                <%=item.InDate.ToString("yyyy-MM-dd hh:mm:ss", System.Globalization.DateTimeFormatInfo.InvariantInfo)%>
                            </td>
                            <td>
                                <a href="JobEdit.aspx?id=<%=item.Id%>" style="color: Black;">[修改]</a>
                                <a href="javascript:;" style="color: Black;" onclick="DeleteInfo('<%=item.Id%>')">[删除]</a>
                            </td>
                        </tr>
                        <% 
                            }            
                        %>
                    </tbody>
                </table>
                <div class="fenpage frg">
                    <Pager:Pagination ID="pager1" runat="server" CPageQueryName="page" MorePageClassName="page"
                        CurrentPageClassName="current" PageNumberClassName="page" DisplayGoPage="false"
                        DisplayGoPageButton="false" DisplayMessage="false" DisplayNextButton="True" DisplayPreviousButton="True"
                        FirstText="首页 " LastText=" 尾页" NextPageText=" 下一页 " NoData="对不起!没有任何相关数据" PreviousPageText=" 上一页 "
                        DisplayPage="5" FirstAndLastClassName="np_page" NavigationAbateClassName="no_page"
                        NPButtonClass="np_page" NoDataNPButtonClass="no_page" />
                </div>
            </div>
        </div>
        <script type="text/javascript">
            function DeleteInfo(id) {
                if (id != "") {
                    if (confirm("您确定要删除吗？")) {
                        location.href = "JobList.aspx?d=" + id;
                    }
                }
            }
        </script>
        <!--显示列表e-->
    </div>
</body>
</html>